<h1>
  声望
  <app-formatted-quantity
    [quantity]="ms.game.prestigeManager.totalPrestige"
    [integer]="true"
  ></app-formatted-quantity>
  &nbsp;&nbsp;&nbsp; 转生
  <app-formatted-quantity
    [quantity]="ms.game.prestigeManager.ascension"
    [integer]="true"
  ></app-formatted-quantity>
  <!-- /
    <span class="monospace">2</span> -->
</h1>

<div class="clr-row full-height">
  <div class="clr-col">
    <h4>
      可用点数
      <a
        role="tooltip"
        aria-haspopup="true"
        class="tooltip tooltip-md tooltip-bottom-right"
      >
        <clr-icon shape="info-circle" size="24"></clr-icon>
        <span class="tooltip-content">通过击败最高级别敌人获得更多</span>
      </a>
      :
      <app-formatted-quantity
        [quantity]="availableSkill.quantity"
        [integer]="true"
      ></app-formatted-quantity>
    </h4>

    <!-- [disabled]="
          ms.game.enemyManager.maxLevel <= ms.game.prestigeManager.totalPrestige
        " -->
    <div class="btn-group btn-primary">
      <button class="btn btn-primary" (click)="prestigeModal = true">
        声望
        <span *ngIf="ms.game.prestigeManager.prestigeToEarn > 0"
          >+
          {{ ms.game.prestigeManager.prestigeToEarn }}
        </span>
      </button>
      <button
        *ngIf="canAscend"
        class="btn btn-success"
        (click)="ascendModal = true"
      >
        转生
      </button>
    </div>
    <a [routerLink]="'/autoTable'">Automators</a>
    <clr-checkbox-container>
      <clr-checkbox-wrapper>
        <input
          type="checkbox"
          clrCheckbox
          value="resetPr"
          name="resetPr"
          [(ngModel)]="ms.game.resetPrestige"
        />
        <label>重置声望</label>
      </clr-checkbox-wrapper>
    </clr-checkbox-container>
    <ul class="list" *ngFor="let desc of skillsList; trackBy: descID">
      <li>{{ desc }}</li>
    </ul>
  </div>
</div>

<!-- Prestige Modal -->
<clr-modal [(clrModalOpen)]="prestigeModal">
  <h3 class="modal-title">
    声望
  </h3>
  <div class="modal-body">
    <p>
      除了声望技能和暗物质，一切都会重置。
      <br />
      你将得到
      {{ ms.game.prestigeManager.prestigeToEarn }}
      技能点和
      <app-formatted-quantity
        [quantity]="ms.game.resourceManager.inactiveDarkMatter.quantity"
        [integer]="true"
      >
      </app-formatted-quantity>

      {{ ms.game.darkMatterManager.darkMatter.name }}
    </p>
  </div>
  <div class="modal-footer">
    <button
      type="button"
      class="btn btn-outline"
      (click)="prestigeModal = false"
    >
      取消
    </button>
    <button type="button" class="btn btn-primary" (click)="prestige()">
      声望
    </button>
  </div>
</clr-modal>

<!-- Ascend Modal -->
<clr-modal [(clrModalOpen)]="ascendModal">
  <h3 class="modal-title">
    转生
  </h3>
  <div class="modal-body">
    <p>
      除了暗物质，包括声望技能在内的一切都会重置。
      <br />
      你将得到双重效果，从技能点和+30%的自动化人员等级.
    </p>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-outline" (click)="ascendModal = false">
      取消
    </button>
    <button type="button" class="btn btn-primary" (click)="ascend()">
      转生
    </button>
  </div>
</clr-modal>
